package cn.smbms.controller.user;

import cn.smbms.tools.Constants;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@Controller
@RequestMapping("/jsp")
public class LogoutController {



	@RequestMapping("/logout")
	public String logout(HttpSession session) {
		//清除session
		session.removeAttribute(Constants.USER_SESSION);
		return "redirect:/login.jsp";
	}


}
